<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">

    <title>休暇一覧</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
<link href="css/style.css" rel="stylesheet" type="text/css">

  </head>

<h2>Nuvo Document System</h2>

  <body>
  <table border="0" width="800" height="500">

  <tr valign="top">

  <td>
    <br>
  <br>
  	<jsp:include page="../index.jsp"></jsp:include>
  </td>


  <td>
    <h3>[ 休暇表 ]</h3>

    <s:url id="before" value="/plan/planMonthly.action">
    	<s:param name="currentYear">${currentYear}</s:param>
    	<s:param name="currentMonth">${currentMonth-1}</s:param>
	</s:url>
	<s:url id="next" value="/plan/planMonthly.action">
    	<s:param name="currentYear">${currentYear}</s:param>
    	<s:param name="currentMonth">${currentMonth+1}</s:param>
	</s:url>
	<s:url id="beforeyear" value="/plan/planMonthly.action">
    	<s:param name="currentYear">${currentYear-1}</s:param>
    	<s:param name="currentMonth">${currentMonth+11}</s:param>
	</s:url>
	<s:url id="nextyear" value="/plan/planMonthly.action">
    	<s:param name="currentYear">${currentYear+1}</s:param>
    	<s:param name="currentMonth">${currentMonth-11}</s:param>
	</s:url>




    <table border="1" cellspacing="0" >
    <tbody>
    <tr>
    	<td align="center">
    	<font size="3">
    	<s:if test="%{#request.currentMonth == 1}">
    	<s:a href="%{#beforeyear}">${currentYear-1}年 ${currentMonth+11}月</s:a>
    	</s:if>
    	<s:else>
    	<s:a href="%{#before}">${currentMonth-1}月</s:a>
    	</s:else>
    	</font>
    	</td>
    	<td align="center" colspan="5">
    	<font size="4"><b>${currentYear}年 ${currentMonth}月</b></font>
    	</td>
    	<td align="center">
    	<font size="3">
    	<s:if test="%{#request.currentMonth == 12}">
    	<s:a href="%{#nextyear}">${currentYear+1}年 ${currentMonth-11}月</s:a>
    	</s:if>
    	<s:else>
    	<s:a href="%{#next}">${currentMonth+1}月</s:a>
    	</s:else>
    	</font>
    	</td>

    </tr>
    <tr>
    	<td align="center">日</td>
    	<td align="center">月</td>
    	<td align="center">火</td>
    	<td align="center">水</td>
    	<td align="center">木</td>
    	<td align="center">金</td>
    	<td align="center">土</td>

    </tr>
    <tr>
    <s:iterator id="counter" value="calendar" status="status">
       	<s:if test="(#status.index >= #request.startofmonth) && (#status.index <= #request.endofmonth)">
       	<td valign="top" style="width: 100; height: 100; background-color: efefef;">
       	<s:property/>
       	<s:iterator value="planlist" >
       		<s:if test="startdate == #counter">
       		<br/>
       		<a href="<s:url value="/plan/planRead.action?num="/><s:property value="num"/>">
       		<b><s:property value="title"/></b>
       		</a>
       		</s:if>

       	</s:iterator>
       	</td>
       	</s:if>
       	<s:else>
       	<td valign="top" style="width: 100; height: 100;"><s:property/></td>
       	</s:else>
    	<s:if test="(#status.index+1)%7 == 0"></tr><tr></s:if>
    </s:iterator>

    </tr>
   	</tbody>
    </table>
    </td>
</tr>
</table>
  </body>
</html>
